/**
 * @author qihui
 * 2009-10-6
 */
package com.qihui.ssh.dao.user;

import java.util.List;

import org.springframework.orm.hibernate3.HibernateTemplate;

import com.qihui.ssh.dao.entities.Employee;
import com.qihui.ssh.dao.sys.BaseDAOImpl;

public class UserDAOImpl extends BaseDAOImpl implements UserDAO {

	/**
	 * 根据userId 查找User
	 * 
	 * @param userId
	 * @return
	 */
	@SuppressWarnings("unchecked")
	public List<Employee> getUserByUserId(String userId) {

		HibernateTemplate ht = this.getHibernateTemplate();
		String hql = "from Employee where userName = ?";
		Object[] obj = { userId };
		return ht.find(hql, obj);
	}
}
